package altanovela.mybatis.model;

import java.util.List;
import org.apache.ibatis.annotations.Select;

public interface MahasiswaMapper {
	@Select("SELECT * " +
			"FROM " +
			"	DATA_MAHASISWA " +
			"ORDER BY NAMA_MHS ASC")
	public List<Mahasiswa> showAllData();
	
	@Select("SELECT * " +
			"FROM " +
			"	DATA_MAHASISWA " +
			"WHERE " +
			"	ID_MHS = #{id}")
	public Mahasiswa showCrtData(String id);
	
	@Select("INSERT INTO " +
			"DATA_MAHASISWA(" +
			"	ID_MHS, " +
			"	JK_MHS, " +
			"	JURUSAN, " +
			"	NAMA_MHS) " +
			"VALUES (" +
			"	#{ID_MHS}, " +
			"	#{JK_MHS}, " +
			"	#{JURUSAN}, " +
			"	#{NAMA_MHS}" +
			")")
	public void insertData(Mahasiswa newmhs);
}



